package com.qys.training.server.controller;

import com.qys.training.base.dto.BaseResult;
import com.qys.training.biz.sysconfig.service.SysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author Winstone
 * @date 2020/8/5 - 2:44 下午
 */
@RestController
@RequestMapping("/config")
public class SysConfigController {
    @Autowired
    SysConfigService sysConfigService;

    @GetMapping("/getConfig")
    public @ResponseBody
    BaseResult getConfig(@RequestParam("key") String configKey) {
        return BaseResult.success(sysConfigService.getConfigValue(configKey));
    }
}
